<template>
  <div class="layout-container">
    <!-- 子路由出口  这样才对子路由有效 只缓存其中的某一个的话要用include-->
    <keep-alive>
      <router-view/>
    </keep-alive>
    <!-- 底部导航栏 -->
    <van-tabbar v-model="active" route>
      <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
      <van-tabbar-item icon="comment-o" to="/qa">问答</van-tabbar-item>
      <van-tabbar-item icon="video-o" to="/video">视频</van-tabbar-item>
      <van-tabbar-item icon="manager-o" to="/my">我的</van-tabbar-item>
    </van-tabbar>
    <!-- /底部导航栏 -->
  </div>
</template>

<script>
export default {
  name: "layout",
  components: {},
  props: [],
  data() {
    return {
      active: 0
    };
  }
};
</script>
<style scoped></style>
